<# # It is recommended to test the script on a local machine for its purpose and effects. # ManageEngine Endpoint Central will not be responsible for any # damage/loss to the data/setup based on the behavior of the script. # Description: Script is designed To Check the health status of physical drives # Configuration Type - COMPUTER #> # Check the health status of physical drives # Get all physical disks $physicalDisks = Get-PhysicalDisk # Loop through each disk and display relevant information foreach ($disk in $physicalDisks) { $diskStatus = [PSCustomObject]@{ DeviceID = $disk.DeviceId FriendlyName = $disk.FriendlyName SerialNumber = $disk.SerialNumber MediaType = $disk.MediaType OperationalStatus = $disk.OperationalStatus HealthStatus = $disk.HealthStatus Size = [math]::round($disk.Size / 1GB, 2) # Size in GB } # Output disk status $diskStatus | Format-Table -AutoSize }